#ifndef VL_STRINGBUILD_HPP
#define VL_STRINGBUILD_HPP

#include <string>
#include <sstream>

namespace vl
{

struct string_builder
{
	template<class T>
	string_builder(T const& v)
	{
		ss << v;
	}
	
	template<class T>
	string_builder& operator<<(T const& v)
	{
		ss << v;
		return *this;
	}
	
	operator std::string()
	{
		return ss.str();
	}
	
	operator void*()
	{
		return ss;
	}
	
private:
	std::stringstream ss;
};

typedef string_builder s_;

}

#endif //VL_STRINGBUILD_HPP
